
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%                                                                  %%%%%
%%%%    IEEE PES Power Grid Library - Optimal Power Flow - v19.05     %%%%%
%%%%          (https://github.com/power-grid-lib/pglib-opf)           %%%%%
%%%%               Benchmark Group - Typical Operations               %%%%%
%%%%                         10 - May - 2019                          %%%%%
%%%%                                                                  %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   CASE39 Power flow data for 39 bus New England system.
%
%   Data taken from [1] with the following modifications/additions:
%
%       - renumbered gen buses consecutively (as in [2] and [4])
%       - added Pmin = 0 for all gens
%       - added Qmin, Qmax for gens at 31 & 39 (copied from gen at 35)
%       - added Vg based on V in bus data (missing for bus 39)
%       - added Vg, Pg, Pd, Qd at bus 39 from [2] (same in [4])
%       - added Pmax at bus 39: Pmax = Pg + 100
%       - added line flow limits and area data from [4]
%       - added voltage limits, Vmax = 1.06, Vmin = 0.94
%       - added identical quadratic generator costs
%       - increased Pmax for gen at bus 34 from 308 to 508
%         (assumed typo in [1], makes initial solved case feasible)
%       - re-solved power flow
%
%   Notes:
%       - Bus 39, its generator and 2 connecting lines were added
%         (by authors of [1]) to represent the interconnection with
%         the rest of the eastern interconnect, and did not include
%         Vg, Pg, Qg, Pd, Qd, Pmin, Pmax, Qmin or Qmax.
%       - As the swing bus, bus 31 did not include and Q limits.
%       - The voltages, etc in [1] appear to be quite close to the
%         power flow solution of the case before adding bus 39 with
%         it's generator and connecting branches, though the solution
%         is not exact.
%       - Explicit voltage setpoints for gen buses are not given, so
%         they are taken from the bus data, however this results in two
%         binding Q limits at buses 34 & 37, so the corresponding
%         voltages have probably deviated from their original setpoints.
%       - The generator locations and types are as follows:
%           1   30      hydro
%           2   31      nuke01
%           3   32      nuke02
%           4   33      fossil02
%           5   34      fossil01
%           6   35      nuke03
%           7   36      fossil04
%           8   37      nuke04
%           9   38      nuke05
%           10  39      interconnection to rest of US/Canada
%
%   This is a solved power flow case, but it includes the following
%   violations:
%       - Pmax violated at bus 31: Pg = 677.87, Pmax = 646
%       - Qmin violated at bus 37: Qg = -1.37,  Qmin = 0
%
%   References:
%   [1] G. W. Bills, et.al., "On-Line Stability Analysis Study"
%       RP90-1 Report for the Edison Electric Institute, October 12, 1970,
%       pp. 1-20 - 1-35.
%       prepared by E. M. Gulachenski - New England Electric System
%                   J. M. Undrill     - General Electric Co.
%       "generally representative of the New England 345 KV system, but is
%        not an exact or complete model of any past, present or projected
%        configuration of the actual New England 345 KV system.
%   [2] M. A. Pai, Energy Function Analysis for Power System Stability,
%       Kluwer Academic Publishers, Boston, 1989.
%       (references [3] as source of data)
%   [3] Athay, T.; Podmore, R.; Virmani, S., "A Practical Method for the
%       Direct Analysis of Transient Stability," IEEE Transactions on Power
%       Apparatus and Systems , vol.PAS-98, no.2, pp.573-584, March 1979.
%       URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4113518&isnumber=4113486
%       (references [1] as source of data)
%   [4] Data included with TC Calculator at http://www.pserc.cornell.edu/tcc/
%       for 39-bus system.
%
%   Copyright (c) 1989 by The Institute of Electrical and Electronics Engineers (IEEE)
%   Licensed under the Creative Commons Attribution 4.0
%   International license, http://creativecommons.org/licenses/by/4.0/
%
%   Contact M.E. Brennan (me.brennan@ieee.org) for inquries on further reuse of
%   this dataset.
%
function mpc = pglib_opf_case39_epri
mpc.version = '2';
mpc.baseMVA = 100;

%% bus data
%	bus_i	type	Pd	Qd	Gs	Bs	area	Vm	Va	baseKV	zone	Vmax	Vmin
mpc.bus = [
	1	 1	 97.6	 44.2	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	2	 1	 0.0	 0.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	3	 1	 322.0	 2.4	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	4	 1	 500.0	 184.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	5	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	6	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	7	 1	 233.8	 84.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	8	 1	 522.0	 176.6	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	9	 1	 6.5	 -66.6	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	10	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	11	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	12	 1	 8.53	 88.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	13	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	14	 1	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	15	 1	 320.0	 153.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	16	 1	 329.0	 32.3	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	17	 1	 0.0	 0.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	18	 1	 158.0	 30.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	19	 1	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	20	 1	 680.0	 103.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	21	 1	 274.0	 115.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	22	 1	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	23	 1	 247.5	 84.6	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	24	 1	 308.6	 -92.2	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	25	 1	 224.0	 47.2	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	26	 1	 139.0	 17.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	27	 1	 281.0	 75.5	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	28	 1	 206.0	 27.6	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	29	 1	 283.5	 26.9	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	30	 2	 0.0	 0.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	31	 3	 9.2	 4.6	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	32	 2	 0.0	 0.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	33	 2	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	34	 2	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	35	 2	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	36	 2	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	37	 2	 0.0	 0.0	 0.0	 0.0	 2	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	38	 2	 0.0	 0.0	 0.0	 0.0	 3	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
	39	 2	 1104.0	 250.0	 0.0	 0.0	 1	    1.00000	    0.00000	 345.0	 1	    1.06000	    0.94000;
];

%% generator data
%	bus	Pg	Qg	Qmax	Qmin	Vg	mBase	status	Pmax	Pmin	Pc1	Pc2	Qc1min	Qc1max	Qc2min	Qc2max	ramp_agc	ramp_10	ramp_30	ramp_q	apf
mpc.gen = [
	30	 520.0	 270.0	 400.0	 140.0	 1.0499	 100.0	 1	 1040.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % NUC
	31	 323.0	 100.0	 300.0	 -100.0	 0.982	 100.0	 1	 646.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	32	 362.5	 225.0	 300.0	 150.0	 0.9841	 100.0	 1	 725.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	33	 326.0	 125.0	 250.0	 0.0	 0.9972	 100.0	 1	 652.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	34	 254.0	 83.5	 167.0	 0.0	 1.0123	 100.0	 1	 508.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	35	 343.5	 100.0	 300.0	 -100.0	 1.0494	 100.0	 1	 687.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	36	 290.0	 120.0	 240.0	 0.0	 1.0636	 100.0	 1	 580.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	37	 282.0	 125.0	 250.0	 0.0	 1.0275	 100.0	 1	 564.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	38	 432.5	 75.0	 300.0	 -150.0	 1.0265	 100.0	 1	 865.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
	39	 550.0	 100.0	 300.0	 -100.0	 1.03	 100.0	 1	 1100.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0	 0.0; % COW
];



%% branch data
%	fbus	tbus	r	x	b	rateA	rateB	rateC	ratio	angle	status	angmin	angmax
mpc.branch = [
	1	 2	 0.0035	 0.0411	 0.6987	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	1	 39	 0.001	 0.025	 0.75	 1000.0	 1000.0	 1000.0	 0.0	 0.0	 1	 -30.0	 30.0;
	2	 3	 0.0013	 0.0151	 0.2572	 500.0	 500.0	 500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	2	 25	 0.007	 0.0086	 0.146	 500.0	 500.0	 500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	2	 30	 0.0	 0.0181	 0.0	 900.0	 900.0	 2500.0	 1.025	 0.0	 1	 -30.0	 30.0;
	3	 4	 0.0013	 0.0213	 0.2214	 500.0	 500.0	 500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	3	 18	 0.0011	 0.0133	 0.2138	 500.0	 500.0	 500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	4	 5	 0.0008	 0.0128	 0.1342	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	4	 14	 0.0008	 0.0129	 0.1382	 500.0	 500.0	 500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	5	 6	 0.0002	 0.0026	 0.0434	 1200.0	 1200.0	 1200.0	 0.0	 0.0	 1	 -30.0	 30.0;
	5	 8	 0.0008	 0.0112	 0.1476	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	6	 7	 0.0006	 0.0092	 0.113	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	6	 11	 0.0007	 0.0082	 0.1389	 480.0	 480.0	 480.0	 0.0	 0.0	 1	 -30.0	 30.0;
	6	 31	 0.0	 0.025	 0.0	 1800.0	 1800.0	 1800.0	 1.07	 0.0	 1	 -30.0	 30.0;
	7	 8	 0.0004	 0.0046	 0.078	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	8	 9	 0.0023	 0.0363	 0.3804	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	9	 39	 0.001	 0.025	 1.2	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	10	 11	 0.0004	 0.0043	 0.0729	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	10	 13	 0.0004	 0.0043	 0.0729	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	10	 32	 0.0	 0.02	 0.0	 900.0	 900.0	 2500.0	 1.07	 0.0	 1	 -30.0	 30.0;
	12	 11	 0.0016	 0.0435	 0.0	 500.0	 500.0	 500.0	 1.006	 0.0	 1	 -30.0	 30.0;
	12	 13	 0.0016	 0.0435	 0.0	 500.0	 500.0	 500.0	 1.006	 0.0	 1	 -30.0	 30.0;
	13	 14	 0.0009	 0.0101	 0.1723	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	14	 15	 0.0018	 0.0217	 0.366	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	15	 16	 0.0009	 0.0094	 0.171	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	16	 17	 0.0007	 0.0089	 0.1342	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	16	 19	 0.0016	 0.0195	 0.304	 600.0	 600.0	 2500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	16	 21	 0.0008	 0.0135	 0.2548	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	16	 24	 0.0003	 0.0059	 0.068	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	17	 18	 0.0007	 0.0082	 0.1319	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	17	 27	 0.0013	 0.0173	 0.3216	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	19	 20	 0.0007	 0.0138	 0.0	 900.0	 900.0	 2500.0	 1.06	 0.0	 1	 -30.0	 30.0;
	19	 33	 0.0007	 0.0142	 0.0	 900.0	 900.0	 2500.0	 1.07	 0.0	 1	 -30.0	 30.0;
	20	 34	 0.0009	 0.018	 0.0	 900.0	 900.0	 2500.0	 1.009	 0.0	 1	 -30.0	 30.0;
	21	 22	 0.0008	 0.014	 0.2565	 900.0	 900.0	 900.0	 0.0	 0.0	 1	 -30.0	 30.0;
	22	 23	 0.0006	 0.0096	 0.1846	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	22	 35	 0.0	 0.0143	 0.0	 900.0	 900.0	 2500.0	 1.025	 0.0	 1	 -30.0	 30.0;
	23	 24	 0.0022	 0.035	 0.361	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	23	 36	 0.0005	 0.0272	 0.0	 900.0	 900.0	 2500.0	 0.0	 0.0	 1	 -30.0	 30.0;
	25	 26	 0.0032	 0.0323	 0.531	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	25	 37	 0.0006	 0.0232	 0.0	 900.0	 900.0	 2500.0	 1.025	 0.0	 1	 -30.0	 30.0;
	26	 27	 0.0014	 0.0147	 0.2396	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	26	 28	 0.0043	 0.0474	 0.7802	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	26	 29	 0.0057	 0.0625	 1.029	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	28	 29	 0.0014	 0.0151	 0.249	 600.0	 600.0	 600.0	 0.0	 0.0	 1	 -30.0	 30.0;
	29	 38	 0.0008	 0.0156	 0.0	 1200.0	 1200.0	 2500.0	 1.025	 0.0	 1	 -30.0	 30.0;
];

%% candidate dc bus data
%column_names%   busdc_i grid    Pdc     Vdc     basekVdc    Vdcmax  Vdcmin  Cdc
mpc.busdc_ne = [
1              1       0       1       345         1.1     0.9     0;
2              1       0       1       345         1.1     0.9     0;
3              1       0       1       345         1.1     0.9     0;
4              1       0       1       345         1.1     0.9     0;
5              1       0       1       345         1.1     0.9     0;
6              1       0       1       345         1.1     0.9     0;
7              1       0       1       345         1.1     0.9     0;
8              1       0       1       345         1.1     0.9     0;
9              1       0       1       345         1.1     0.9     0;
10             1       0       1       345         1.1     0.9     0;
11             1       0       1       345         1.1     0.9     0;
12              1       0       1       345         1.1     0.9     0;
13              1       0       1       345         1.1     0.9     0;
14              1       0       1       345         1.1     0.9     0;
15              1       0       1       345         1.1     0.9     0;
16              1       0       1       345         1.1     0.9     0;
17              1       0       1       345         1.1     0.9     0;
18              1       0       1       345         1.1     0.9     0;
19              1       0       1       345         1.1     0.9     0;
20              1       0       1       345         1.1     0.9     0;
21              1       0       1       345         1.1     0.9     0;
22              1       0       1       345         1.1     0.9     0;
23              1       0       1       345         1.1     0.9     0;
24              1       0       1       345         1.1     0.9     0;
25              1       0       1       345         1.1     0.9     0;
26              1       0       1       345         1.1     0.9     0;
27              1       0       1       345         1.1     0.9     0;
28              1       0       1       345         1.1     0.9     0;
29              1       0       1       345         1.1     0.9     0;
30              1       0       1       345         1.1     0.9     0;
31              1       0       1       345         1.1     0.9     0;
32              1       0       1       345         1.1     0.9     0;
33              1       0       1       345         1.1     0.9     0;
34              1       0       1       345         1.1     0.9     0;
35              1       0       1       345         1.1     0.9     0;
36              1       0       1       345         1.1     0.9     0;
37              1       0       1       345         1.1     0.9     0;
38              1       0       1       345         1.1     0.9     0;
39              1       0       1       345         1.1     0.9     0;
];

%% candidate branches
%column_names%   fbusdc  tbusdc  r      l        c   rateA   rateB   rateC status cost
mpc.branchdc_ne = [
1	 2	  0.0035        0.00	0.00   600.0	 	  0  0  1.0	 1;
1	 39	  0.001	        0.00	0.00   1000.0    0  0  1.0	 1;
2	 3	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 25	  0.007	        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 30	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
3	 4	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
3	 18	  0.0011        0.00	0.00   500.0	 	  0  0  1.0	 1;
4	 5	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
4	 14	  0.0008        0.00	0.00   500.0	 	  0  0  1.0	 1;
5	 6	  0.0002        0.00	0.00   1200.0 	  0  0  1.0	 1;
5	 8	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 7	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 11	  0.0007        0.00	0.00   480.0	 	  0  0  1.0	 1;
6	 31	  0.001	        0.00	0.00   1800.0    0  0  1.0	 1;
7	 8	  0.0004        0.00	0.00   900.0	 	  0  0  1.0	 1;
8	 9	  0.0023        0.00	0.00   900.0	 	  0  0  1.0	 1;
9	 39	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
10	 11	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 13	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 32	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
12	 11	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
12	 13	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
13	 14	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
14	 15	  0.0018        0.00	0.00   600.0	 	  0  0  1.0	 1;
15	 16	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 17	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 19	  0.0016        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 21	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 24	  0.0003        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 18	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 27	  0.0013        0.00	0.00   600.0	 	  0  0  1.0	 1;
19	 20	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
19	 33	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
20	 34	  0.0009        0.00	0.00   900.0	 	  0  0  1.0	 1;
21	 22	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
22	 23	  0.0006        0.00	0.00   600.0	 	  0  0  1.0	 1;
22	 35	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
23	 24	  0.0022        0.00	0.00   600.0	 	  0  0  1.0	 1;
23	 36	  0.0005        0.00	0.00   900.0	 	  0  0  1.0	 1;
25	 26	  0.0032        0.00	0.00   600.0	 	  0  0  1.0	 1;
25	 37	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
26	 27	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 28	  0.0043        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 29	  0.0057        0.00	0.00   600.0	 	  0  0  1.0	 1;
28	 29	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
29	 38	  0.0008        0.00	0.00   1200.0    0  0  1.0	 1;
%{
1	 2	  0.0035        0.00	0.00   600.0	 	  0  0  1.0	 1;
1	 39	  0.001	        0.00	0.00   1000.0    0  0  1.0	 1;
2	 3	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 25	  0.007	        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 30	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
3	 4	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
3	 18	  0.0011        0.00	0.00   500.0	 	  0  0  1.0	 1;
4	 5	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
4	 14	  0.0008        0.00	0.00   500.0	 	  0  0  1.0	 1;
5	 6	  0.0002        0.00	0.00   1200.0 	  0  0  1.0	 1;
5	 8	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 7	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 11	  0.0007        0.00	0.00   480.0	 	  0  0  1.0	 1;
6	 31	  0.001	        0.00	0.00   1800.0    0  0  1.0	 1;
7	 8	  0.0004        0.00	0.00   900.0	 	  0  0  1.0	 1;
8	 9	  0.0023        0.00	0.00   900.0	 	  0  0  1.0	 1;
9	 39	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
10	 11	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 13	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 32	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
12	 11	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
12	 13	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
13	 14	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
14	 15	  0.0018        0.00	0.00   600.0	 	  0  0  1.0	 1;
15	 16	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 17	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 19	  0.0016        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 21	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 24	  0.0003        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 18	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 27	  0.0013        0.00	0.00   600.0	 	  0  0  1.0	 1;
19	 20	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
19	 33	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
20	 34	  0.0009        0.00	0.00   900.0	 	  0  0  1.0	 1;
21	 22	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
22	 23	  0.0006        0.00	0.00   600.0	 	  0  0  1.0	 1;
22	 35	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
23	 24	  0.0022        0.00	0.00   600.0	 	  0  0  1.0	 1;
23	 36	  0.0005        0.00	0.00   900.0	 	  0  0  1.0	 1;
25	 26	  0.0032        0.00	0.00   600.0	 	  0  0  1.0	 1;
25	 37	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
26	 27	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 28	  0.0043        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 29	  0.0057        0.00	0.00   600.0	 	  0  0  1.0	 1;
28	 29	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
29	 38	  0.0008        0.00	0.00   1200.0    0  0  1.0	 1;
1	 2	  0.0035        0.00	0.00   600.0	 	  0  0  1.0	 1;
1	 39	  0.001	        0.00	0.00   1000.0    0  0  1.0	 1;
2	 3	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 25	  0.007	        0.00	0.00   500.0	 	  0  0  1.0	 1;
2	 30	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
3	 4	  0.0013        0.00	0.00   500.0	 	  0  0  1.0	 1;
3	 18	  0.0011        0.00	0.00   500.0	 	  0  0  1.0	 1;
4	 5	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
4	 14	  0.0008        0.00	0.00   500.0	 	  0  0  1.0	 1;
5	 6	  0.0002        0.00	0.00   1200.0 	  0  0  1.0	 1;
5	 8	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 7	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
6	 11	  0.0007        0.00	0.00   480.0	 	  0  0  1.0	 1;
6	 31	  0.001	        0.00	0.00   1800.0    0  0  1.0	 1;
7	 8	  0.0004        0.00	0.00   900.0	 	  0  0  1.0	 1;
8	 9	  0.0023        0.00	0.00   900.0	 	  0  0  1.0	 1;
9	 39	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
10	 11	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 13	  0.0004      	0.00	0.00   600.0	 	  0  0  1.0	 1;
10	 32	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
12	 11	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
12	 13	  0.0016        0.00	0.00   500.0	 	  0  0  1.0	 1;
13	 14	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
14	 15	  0.0018        0.00	0.00   600.0	 	  0  0  1.0	 1;
15	 16	  0.0009        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 17	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 19	  0.0016        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 21	  0.0008        0.00	0.00   600.0	 	  0  0  1.0	 1;
16	 24	  0.0003        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 18	  0.0007        0.00	0.00   600.0	 	  0  0  1.0	 1;
17	 27	  0.0013        0.00	0.00   600.0	 	  0  0  1.0	 1;
19	 20	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
19	 33	  0.0007        0.00	0.00   900.0	 	  0  0  1.0	 1;
20	 34	  0.0009        0.00	0.00   900.0	 	  0  0  1.0	 1;
21	 22	  0.0008        0.00	0.00   900.0	 	  0  0  1.0	 1;
22	 23	  0.0006        0.00	0.00   600.0	 	  0  0  1.0	 1;
22	 35	  0.001	        0.00	0.00   900.0	 	  0  0  1.0	 1;
23	 24	  0.0022        0.00	0.00   600.0	 	  0  0  1.0	 1;
23	 36	  0.0005        0.00	0.00   900.0	 	  0  0  1.0	 1;
25	 26	  0.0032        0.00	0.00   600.0	 	  0  0  1.0	 1;
25	 37	  0.0006        0.00	0.00   900.0	 	  0  0  1.0	 1;
26	 27	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 28	  0.0043        0.00	0.00   600.0	 	  0  0  1.0	 1;
26	 29	  0.0057        0.00	0.00   600.0	 	  0  0  1.0	 1;
28	 29	  0.0014        0.00	0.00   600.0	 	  0  0  1.0	 1;
29	 38	  0.0008        0.00	0.00   1200.0    0  0  1.0	 1;
%}
];


%% candidate converters
%column_names%   busdc_i busac_i type_dc type_ac P_g   Q_g  islcc  Vtar rtf xtf  transformer tm   bf filter    rc      xc  reactor   basekVac Vmmax   Vmmin   Imax    status   LossA LossB  LossCrec LossCinv  droop Pdcset    Vdcset  dVdcset Pacmax Pacmin Qacmax Qacmin cost
mpc.convdc_ne = [
1       1   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     	1.1033 0.887  2.885    2.885       0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
2       2   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
3       3   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
4       4   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
5       5   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
6       6   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
7       7   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
8       8   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
9       9   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
10      10   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
11      11   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
12      12   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
13      13   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
14      14   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
15      15   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     	1.1033 0.887  2.885    2.885       0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
16      16   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
17      17   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
18      18   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
19      19   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
20      20   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
21      21   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
22      22   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
23      23   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
24      24   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
25      25   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
26      26   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
27      27   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
28      28   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
29      29   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
30      30   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
31      31   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
32      32   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
33      33   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
34      34   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
35      35   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
36      36   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1     1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
37      37   1       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885         0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
38      38   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
39      39   2       1       -360    -1.66   		0 1.0        0.0015  0.1121 1 1 0.0887 1 0.0001   0.16428 0 345         1.1     0.9     10     1      1.1033 0.887  2.885    2.885        0.0050    -52.7   1.0079   0 1000 -1000 500 -500 3;
];

%% generator cost data
%	2	startup	shutdown	n	c(n-1)	...	c0
mpc.gencost = [
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % NUC
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
2	 0.0	 0.0	 3	   0.000000	  0	   0.000000; % COW
];
